package com.qintingfm.bootstrapdownload.config;

import com.qintingfm.bootstrapdownload.download.DownConfig;
import com.qintingfm.bootstrapdownload.download.DownLoadServer;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class Config {
    @Bean
    @ConfigurationProperties(prefix = "setting")
    DownConfig downConfig(){
        return new DownConfig();
    }
    @Bean
    @ConfigurationProperties(prefix = "setting")
    DownLoadServer downLoadServer(DownConfig downConfig){
        return new DownLoadServer(downConfig);
    }
}
